
(function () {

    function browserResize() {

        var w = window.innerWidth;//获取浏览器窗口宽度
        var h = window.innerHeight;

        if (w > 375) {
            let localStorageW = localStorage.getItem('w')
            if (localStorageW != w) {
                location.reload()
             
            }
        }

        if (w > 375) {
            document.documentElement.style.fontSize = w / 1920 * 100 + "px";
            localStorage.setItem('w', w)

        } else {
            document.documentElement.style.fontSize = w / 375 * 100 + "px";
        }
    }

    browserResize();

    var browserTimer;

    window.addEventListener("resize", function () {

        clearTimeout(browserTimer);

        browserTimer = setTimeout(browserResize, 200)

    })

})()
